<div id="sidebar">


    <div class="panel-heading-primary clearfix bg-yellow">
		<span id="title"><span class="glyphicon glyphicon-info-sign"></span> <?= $title; ?>
		</span>
	</div>

	<?php foreach ($recent as $recent):?>
	<?php 
   $c = $this->term_model->getTermValue($recent->id,'city',1);
	
	if($c){
	
	$loc = getPK('location',$c);
	
	
	
//	var_dump($loc);die();
//	die("YES");
	$loc = seoUrl($loc['name']);
	}else{
		
		$loc =  config_item('country');
		
		$loc = seoUrl($loc);
	}


	$cat = getPK('category',$this->term_model->getTermValue($recent->id,'keyword',1));
	//var_dump($cat);die();
	$cat = seoUrl($cat['name']);
	?>
	<div class="list clearfix">
		<div class="col-xs-2">
			<i class="fa fa-3x fa-map-marker fa-border"></i>
		</div>
		<div class="col-xs-10">
			<h4>
				<a href="<?= base_url().$loc."/".$cat."/".$recent->slug."-".$recent->id; ?>"><?= $recent->title; ?></a>
			</h4>
			
			<address><?= $this->location_model->getLocationHTML($recent->id); ?></address>

			<small class="text-danger"><?= $this->category_model->getCategoryHTML($recent->id); ?></small>

		</div>
		
		
	</div>
	<?php endforeach;?>
	
	
	
	


</div>
